local liezhi = fk.CreateSkill {
  name = "lingling__liezhi",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["lingling__liezhi"] = "烈志",
  [":lingling__liezhi"] = "锁定技，你和上家使用【杀】的次数上限+1。",
}

liezhi:addEffect("targetmod", {
  residue_func = function (self, player, skill, scope, card, to)
    if card and card.trueName == "slash" then
      local n = 0
      if player:hasSkill(liezhi.name) then
        n = 1
      end
      if player:getNextAlive(true) ~= player and player:getNextAlive(true):hasSkill(liezhi.name) then
        n = n + 1
      end
      return n
    end
  end,
})

return liezhi
